home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1988 September
/
1988-09.d64
/
boom & bust
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
146 lines
10 rem copyright 1988 compute! publications, inc. - all rights reserved
20 ifa=1then80
30 print"[147][144] copyright 1988 [146]"
40 print"compute! publications, inc.[146]"
50 print " all rights reserved [146]":fori=1to1500:next
70 a=1:load"b&b.ml",8,1
80 forsd=0to5:readsd(sd):poke52580+sd*2,sd(sd):next
90 forn=1to8:readfh(n),fl(n):next:sid=54272
100 dima$(50)
110 reada$(t):ifa$(t)<>"end"thent=t+1:goto110
120 t=t-1:sys16385:poke845,0:poke844,0
130 forn=0to2*t:r1=int(rnd(0)*t):r2=int(rnd(0)*t)+1:t$=a$(r1):a$(r1)=a$(r2)
140 a$(r2)=t$:next
150 k=0:p=1:sc(0)=0:sc(1)=0:sf(0)=0:sf(1)=0:fl=0:rg=0:ff=0
160 print"[147]":poke214,11:poke211,14:printchr$(142)"[159]boom and bust":gosub880
170 print"press 1[146] for 1 player"
180 print"press 2[146] for 2 players ";
190 getk$:ifk$=""then190
200 ifk$<>"1"andk$<>"2"then190
210 printk$;:d$(1)="phrase":d$(2)="thing":d$(3)="occupation"
220 p$(0)=" player 1 [146]":p$(1)="[158] player 2 [146]":e$=" "
230 ifk$="1"thenk=1:p=0:p$(1)=" [158] bonus [146]"
240 fort1=0tot:forsd=0to5:poke52580+sd*2,sd(sd):next
250 poke845,0:poke53269,peek(53269)or1
260 q=0
270 d$=left$(a$(t1),1):a$=right$(a$(t1),len(a$(t1))-1)
280 d=val(d$):d$=d$(d):sc(0)=0:sc(1)=0:rg=0
290 ifk=1thensc(1)=100
300 f=(40-len(a$))/2
310 poke857,30:poke845,0:gosub1110
320 sp=0:forn=1tolen(a$):m$=mid$(a$,n,1):ifm$=" "thensp=sp+1:goto340
330 poke1703+n+f,83:poke55975+n+f,1
340 next
350 ifk=0thenp=abs(p-1)
360 tm=125:poke844,p
370 gosub1170
380 fr=fre(0):poke845,1
390 wr=0:ifpeek(197)=4thenpoke845,0:gosub660:ifwr=2thennextt1:goto1040
400 ifwr=1thenpoke53269,peek(53269)or1:goto350
410 tm=tm-1:iftm<10thengosub970
420 iftm<1andpeek(833)<>2andpeek(857)=qthenpoke845,0:d=30:gosub840:goto350
430 ifpeek(845)=1then390
440 tm=100:forn=1to500:nextn:ifpeek(857)=qthend=20:gosub840:goto350
450 q=peek(857):r=peek(837):s=peek(838)/2:l=94-(r*6)-(6-s)
460 in=0:ifl>90thenl=l-56:in=64
470 m=0:forn=1tolen(a$)
480 ifmid$(a$,n,1)<>chr$(l)then570
490 rg=rg+1:m=1:poke54283,33:poke1703+n+f,l-64+in:poke55975+n+f,7
500 a1$=left$(a1$,n-1)+" "+mid$(a1$,n+1,len(a1$)):poke54283,32
510 sc(p)=sc(p)+10:gosub610
520 ma=1:fm=0:forn1=1tolen(a$):m$=mid$(a1$,n1,1):ifm$=" "then550
530 iffm=0thenm1$=m$:fm=1
540 ifm$<>m1$thenma=0
550 next
560 iflen(a$)-rg-sp=1orma=1thengosub660:goto1010
570 next
580 ifm=1then380
590 d=20:gosub840:goto350
600 rem
610 forc=0to1:sc$(c)=str$(sc(c)):sc$(c)=sc$(c)+left$(e$,7-len(sc$(c))):next
620 forc=0to1:sc$(c)=str$(sc(c)):sc$(c)=sc$(c)+left$(e$,7-len(sc$(c))):next
630 print"";:poke214,21:print:poke211,1:print"$"sc$(0)tab(31)"$"sc$(1);
640 return
650 rem
660 poke53269,peek(53269)and254:poke198,0:poke214,22:print:poke211,0:w=0:g$=""
670 print"[159]guess? ";:forn=1tolen(a$):print"[164]";:next:print"[145]":print"";
680 getg1$:ifg1$=""then680
690 g1=asc(g1$):ifg1=13then770
700 ifg1=20andg$<>""theng$=left$(g$,len(g$)-1):fl=1
710 iffl=1and(len(g$)<len(a$))thenprint"[157][164][157]";
720 iffl=1and(len(g$)>len(a$)-1)thenprintg1$;
730 iffl=1thenfl=0:goto680
740 ifg1>90org1<32then680
750 iflen(g$)<33thenprintg1$;:g$=g$+g1$
760 goto680
770 ifg$<>a$then810
780 wr=2:sf(p)=sf(p)+sc(p)+500+sc(1)*k:sc(1)=0
790 poke781,23:sys59903:print"right!";:poke53269,peek(53269)or1:gosub610
800 gosub1110:gosub880:return
810 ifk=1thensc(1)=0
820 poke781,23:sys59903:print"wrong!";:d=50:gosub840:poke781,23:sys59903
830 wr=1:gosub610:return
840 pokesid+4,17:forw=dto5 step-1:pokesid+1,w:forn=1tod:next:next:pokesid+4,16
850 ifk=1thensc(1)=sc(1)-10:ifsc(1)<0thensc(1)=0
860 gosub610:return
870 rem
880 pokesid+5,15:pokesid+6,252:pokesid+12,15:pokesid+13,252:wf=64
890 forl=1to30:n=int(rnd(0)*6)+3
900 ifn=9thenforw=1to60:next:goto950
910 pokesid,fl(n):pokesid+1,fh(n):poke53248,fl(n)
920 pokesid+7,fl(n)+10:pokesid+8,fh(n)
930 ifwf=64thenpokesid+3,7:pokesid+2,150:pokesid+10,7:pokesid+9,150
940 pokesid+4,wf+1:pokesid+11,17:forw=1to80:next:pokesid+4,wf:pokesid+11,16
950 next:poke53248,28:return
960 rem
970 pokesid+6,242:pokesid+1,80:pokesid+4,17:pokesid+4,16
980 forn=1totm+80:nextn:pokesid+1,60:pokesid+4,17
990 pokesid+4,16:forn=1totm+50:nextn:return
1000 rem
1010 ifwr=2thennextt1:goto1040
1020 ifk=0thenp=abs(p-1):gosub1170:gosub660:ifwr=2thennextt1:goto1040
1030 print:printa$:forn=1to1500:next:nextt1
1040 poke53269,1
1050 ifsf(0)>sf(1)thenp$=p$(0)
1060 ifsf(0)<sf(1)thenp$=p$(1)
1070 ifsf(0)=sf(1)thenprintspc(15);:print"[156]tie game!!":goto1100
1080 print:print"[145][145][156]congratulations to "p$
1090 print:print"boom and bust champion!!"
1100 gosub880:goto130
1110 forc=0to1:sf$(c)=str$(sf(c)):sf$(c)=sf$(c)+left$(e$,7-len(sf$(c))):next
1120 print"":gosub610:poke214,19:print:poke211,1
1130 ifk=0thenprint"$"sf$(0)spc(22)"[158]$"sf$(1)
1140 ifk=1thenprint"$"sf$(0)
1150 printp$(0)spc(19)p$(1):gosub610:a1$=a$
1160 return
1170 poke53280,9-p*2:poke214,11:print:poke211,10:printp$(p)" "d$:return
1180 rem
1190 data 153,154,163,164,165,166
1200 data28,49,31,165,33,135,37,62,42,62,44,193,50,60,25,30
1210 data"1a stitch in time saves nine"
1220 data"1violets are blue"
1230 data"1love conquers all"
1240 data"1where is the fire"
1250 data"1of mice and men"
1260 data"1along came a spider"
1270 data"3police officer"
1280 data"1please keep off the grass"
1290 data"1little red riding hood"
1300 data"1the right stuff"
1310 data"1a penny for your thoughts"
1320 data"3school teacher"
1330 data"3taxi driver"
1340 data"2book marker"
1350 data"2car"
1360 data"2shopping cart"
1370 data"2a glass of milk"
1380 data"3computer programmer"
1390 data"3cook"
1400 data"3nurse"
1410 data"3inventor"
1420 data"1silence is golden"
1430 data"1sugar and spice"
1440 data"1the three little pigs"
1450 data"end"
1460 end